
import { defineStore } from 'pinia';

export const msgReadStore = defineStore('msgIsRead', {
  state: () => ({
    isRead: '',     // 消息 isRead
  }),
  actions: {
    // 更新 isRead
    setIsRead(isRead: any) {
      this.isRead = isRead;
    },
    // 清除isRead
    clearIsRead() {
      this.isRead = '';
    },
  },
  getters: {
    // 获取 isRead
    getIsRead: (state) => state.isRead,
  },
});